xquery version "1.0-ml";

import module namespace plib = "http://porvino.com/lib" at "/porvino/lib/lib.xqy";

(:	We do not need the id's of the names here because we are only returning a list
	of names to the wine form to make the data entry easier. Not using the id of any wines
:)
let $wines := fn:doc()/wine

return
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
	<title></title>
	<link rel="stylesheet" href="/porvino/style/home.css" type="text/css"></link>
	   
	<!-- script and style for table -->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
	<script type="text/javascript" src="http://tablesorter.com/jquery.tablesorter.min.js"></script>
    <script type="text/javascript" id="js">
            <![CDATA[
            $(document).ready(function() {
            // call the tablesorter plugin
            $("#wineList").tablesorter( {sortList: [[0,0]], widgets:['zebra']} );
            }); 
            ]]>
    </script>
    <link rel="stylesheet" href="/porvino/style/tableSorter/style.css" type="text/css" media="print, projection, screen" />
    
	</head>
	<body>
        {plib:globalNav()}
        {plib:listWines($wines)}
	</body>
</html>